WIP: organization of angularjs controller code.
Prettier code in angularjs service.

Of course beauty is in the eye of the beholder. So it may look uglier to you. Or the beholder may hit you with a disintegration beam from one of its eyestalks. Lesson here is, there are more important things in life to worry about.
Fixed small bugs in angularjs code.