There's got to be a way to split this method up into something under a hundred lines long