House keeping and minor fixes