Clean up refactoring, moved out _debug.cpp to separate folder.
Updated Cmake to compile the needed file when using the library in debug mode.