Original commit from a quick, but working edit.