Removed some dead code
Removed more dead code and added replacement test
Added early exception if field name not found