Trivial minor optimizations

Couple less calls to move_cost and field_at which are expensive to exectute.