some cleanup + Makefile
moved tests to seperate directory
converted to EUnit tests
moved tests to files
some cleanup