Changed the way oFactory is defined.