adding third party X13 and Diamond Groestl code contributions.