Ripping out require.js and starting again from scratch.