Final tweaks and bug fixes.