got lost in the merge :s
moved most debug logs into a if (DEBUGMODE)