Changed to not use ObjectFactory