update makefile; fix regexes and tests