minor tweaks to Tally code (cleanups) and for gcc