divide application javascript into seperate files.

Yay!