cleaned up code
- code can be minified via closure compile now without breaking
- fixed jslint warnings
- added labels