General tweaks and improvements