Broke out controller to separate javascript file