Added field tests. Minor corrections to field code
Added element tests. Many bug fixes in element code