Cleaned up cookie fetching and more