Pulled in a bunch more dribs and drabs from another project.