define MAX in tack.c
fix up some tack.c types