Revised controller APIs : Added try except block, renamed function name, fixed some minor bugs