seperted out controllers and implemented requirejs