Add support for TH. Clean up error messages.
Documentation, bugfixes