* fixed preapply commands and added postapply * removed duplicate code and pass in stage name. Added post_plan. Updated docs