Update readme and license file, and sightly clean-up the code.