Refactored debug functions
Suppressed DEBUG constant