Refactoring and documentation

* Replaced EmailException with Springs default MailException
* some refactoring
* documentation added