TomDoc and various fixes.