Complete refactor of loading order