Refactored to advocated module structure.