refactor isGenerator; fix Makefile