Start fleshing out position processing.

Messy but working-ish.