Multiple minor tweaks, fixes and improvements