Move nextMessageIsControl to top of else branch to reduce time spent waiting for a resolution to what the next input is.