Pull request 7-25, merge in Dan's changes