Convert some client stuff to use require.js