Thesis: further cleanup, remove some TODOs etc.