Rewrote framework

Restructured framework and build process so core framework is a single
js file to be included.