fixes and added a Makefile