More cleanups, more tests. Positions instead of xy. agent.moveTo, patches.patch unified