Added timestamp option to get_plan + some cleaning