New movement code, not yet complete