client: Implemented a module dependency mechanism. Now the module build order for index.js doesn't have to be hard-coded.