Change tetfield interface and fix newline-eof warnings