Initial commit, rewrite from ancient implementation.
Put file summary in readme, and cleaned up makefile