Refactored main view into separate class.

Added ComposeView.
Implemented mail sending.