Added object hooks and modified constructors not to create objects from id of 0