Update with changes by @gwitmond for the @nulpunt project.