Random improvements and fixes.