Fixed sending mails by adding dependencies
Refactored controllers and added/updated documentation