Fixed search function and added getObjectClass