Misc fixes, mostly addressing review comments