Fixed some more warnings and cleaned up debug interface