Issue 740

Merge in Ely's changes