Add Makefile, and some other minor improvements

I added a Makefile in src/ folder to build directly from a terminal.

I also made some code cleanups and removed warnings. The changes are minor, but I was not able to test it (don't know how to use it actually), so maybe you should check if it still works.
I successfully compiled these changes on OSX 10.7 and it works with both `make` and XCode, but did not test it on 10.8.

One more thing, not really related : I made the changes on Debian 7.0 and clang++ segfaults when compiling, but it's ok with g++, so maybe you should warn or even remove the clang++ compilation line from `readme.md`