Restructured app
Support for RequireJS optimization. Closes #7