Fixed require.config issues, refactored, license