Hsph changes

Addresses http://manage.dimagi.com/default.asp?134106#770035