Move logic for simplicity

Seems easier to follow as such