Implement localfields.
Merge branch 'local-fields'