Minor nitpick 3: You could put the two if-statements into a long one making this diff really small