Merge "Refactor module registration"