Remove some redundant code
Make module loader parse dependencies in asynchronous way

This means that modules can be loaded in pretty much any order. It is important
to load module.js first, though. Otherwise it doesn't matter.