Fix a bunch of comments and remove several TODOs.