Some adaptations

Some adaptations for publication as a generally available, easier to
improve, and ready-to-use, open source project.