Cleaned up a bunch of TODOs, tidied code.

No internet for the day, so I cleaned up TODOs