Combined planCtrl.js and testCtrl.js