Some reorganization, added start of planner.js

Just the file, no real path planning happening here.