More improvements and fixes.