Brownju/bug/47 - rebased

This is @Chetco's branch brought up to / merged with current develop.