Start adding program tests, fix a bug in parser