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

Made rotateState(s) accept element as parameter.
Fixed moving coordinate with arrow keys.

Broken by 60da622d0df1066f61fafaf8852063f18ee91c48.