Swap if statements into more probably order and remove syso debug.