Additional controller js cleanup

limit scope of try catch blocks, remove boolean vars, remove unnecessary case blocks around return statements, copy arguments into array early using slice.