More tweaks and fixes