Refactored code by adding a CRSFGetter class with a static method to handle getting the website CRSF token