Misc fixes and improvements from WBTW