Update application structure. Fix require.js config bug that caused issues etc