Field moved changed to dictionary.
New tests added.
Formatting changed and debug printfs removed.