Luminate Interview Question

How would you improve this code base