refactor directory and module structure