[IMP]planner:renamed some js function and improve code.