fix memory leaks
remove test binary
move code into src directory
all tests pass
Merge pull request #12 from andrewjpage/master

fix memory leaks and update make