Fixed bug with to json method. If a value was undefined it shat itself.
Accidentally deleted compiled source