Improvements and bug fixes.