application refactored for AMD usage; require.js configuration added