Design tweaks and bug fixes