More tweaks and minor fixes