Fixes requirejs loading problem.

It didn't make sense to do $(window).load since everything has already
been loaded anyways.

Also some minor changes here and there.