Added constructor
Added setMode method
Formatting
Corrected namespace in docblocks