Opm improvements

http://manage.dimagi.com/default.asp?116271#669702