Fixed the order to importing Javascripts

The previous Javascripts importing order was incorrect as RequireJS will
be loaded before others. As a result, some of the hardcoded dependencies
will be broken.