adding makefile.
some minor bugs. everything seems to be working.