code cleanup and minor start on the JS poriton of the framework