split functionality into modules with require.js