Add a pairs metamethod to iterate over the properties of an object.
Add number property, tidy up some object access
Merged.