relicensed to the more permissive Apache License 2.0, and other minor stuff