Refactor transformAsObject to transformWithDetails

This matches current best thinking.