Else starts on separate line
Create the partial functions once, no need for currying
Move partial functions closer to _State