Add object.extend() and tests