Revamped character movement

New algorithm in place.  Not working yet.
Merged with master