Small improvements and bug fixes.