simplified makefile, corrected text parsing