Fix typo in CLI proxy module

An exception was defined using def instead of class statement, fixing
this.

Also do some formatting adjustments like using single quote for string
in the entire module and some spell fixes.