History support and a lot of fixes.