Luminate interview question

How would you improve this code base