Could the following giant series of if statements be separated usefully into separate methods? Might be a bit more readable...