fixes to makefile, add fields to tref annotation when typechecking

update the makefile to use the autorules a bit better
add rough list of fields for types in trefs annotation