Code reformat.
Fixed catching exception code.
Scaladoc & refactor.