Tools stuff, lots of fixes.