First working version of the angularJS controllers