Minor improvements and bugFixes.