Seems like a lot of potentially error-prone manual code (most of it very tedious and repetitive). Can this be improved using TH?