t77 - code cleanup