Refactored function names for consistency.
Removed debug functionality.