Adds some helpers for debugging tasks; removes some dead code