Cleaned up, added email support