Rewritten to use require.js, lovely modular goodness