Fixed a few -Wall warnings, improved README.md, separated the file into modules.