Added ability to initialize object given id of object in database