setting scaling only if not already set
allocate one more pointer in object table

object table indexes start at 1, will be easier to use.
reindenting all the source code