Modified module loader so that it loads prerequisites in order