Refactor, plenty of changes

Including slightly improved readme and history. Added install job to
Makefile. Improved lib, added better comments. Added LICENSE. Slight
change to .gitignore.