Minor fixes and TODOs