More refactoring. mostly setting TODOs and renaming stuff.