[IMP]planner: clean code in js.