module structure and code cleanup