Refactor module structure.