Issues #6, and #2. Support cookies and add OfflineObjectFactory