Making temporary registerFields2() method.
Added getFields().
Untested code for registering fields.