Minor tweaks and bug fixes.