Initial push to github, based on work from cprop.