Considering how long this method has become it would be nice if it could be broken up a bit into smaller methods to make it a bit more easily readable