Added makefile, fixed some small issues