Changed planning_primitives to take plan as input and raise error exception if it's not main.
added planning files