Updated index to be 5.2 compatible
Tidied up object.lua a little