Removed commented code and email functions