cleanups to old, broken test suite and some bug fixes it uncovered

also, fix any/c generator