Removed some dead code, updated TODOs, corrected constant reference