Cosmetic fixes and support for latest Tez version