Updated comments and prepend #define values with 'THD_'