begin modularizing code w require.js