A few more tweaks and bug fixes.