Improve code quality and readability.

I just stumbled upon this project today (having watched AngularUI intermittently for awhile), and I love the goals and the directives.  I also love AngularJS (as you might imagine), and I especially love the emphasis on testing and quality code.

I opened this PR because I am offering to clean up the structure of the code a bit, as I feel there are areas where it could use some help.  In fact, it inspired me to write a general [style guide](https://github.com/brian-frichette/js-style-guide).  

I realize this a long shot PR, as this sort of thing is really the subject of much opinion, but I had to try as I really feel like its a valuable improvement.  If there is anything specifically you'd prefer to drop, I'm open (I've followed multiple coding standards).