improved makefile, readme. small code cleanups