Fixed typo.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Refactored all relevant statics to proper objects

- this simplifies unit testing and hopefully simplifies a port to Truffle
- renamed methods that set number of fields to indicate that they also clear the fields with nilObjects
- removed _assert which wasn't used

Signed-off-by: Stefan Marr <git@stefan-marr.de>