Improve documentation explaining why decoding is being done when and where it is. Refactor individual logic blocks (fetching the ERAttachment, evaluating if a request is legitimate) into their own methods to make code more digestible and better encapsulated.