Improved the APIWrapperFactory using method chaining