Breaking out a method that was doing too much