Refactored module structure