Minor fixes, improvements to fields, more unit tests.