Minor bug fixes
Added Makefile