Changed the debug functions to static