Resolve a bunch of TODOs the previous commits added.