Extract getUsingCursor function into a separate utility file
Extract cookie reading utility function into a separate file