Moved DebugUtils to Utils and added more helper functions