Pulled code out of noweb
Consolidated makefile