Remove unused code

This has all moved to web service class.
Remove unused variables

Remove anything related to mail functions and move database information
into instance variables as these will be sent onto a web service rather
than used directly.