Fixed email bug
Removed deprecated code