Different improvements and fixes.