Tweaks and bug fixes.