Partially working angularJS controllers and services