Working version with tests and license.