Add some API functions to object.c