Remove debug functionalities
Minor refactoring