Some minor tweaks and improvements