Major code refactoring. Addition of email support and verification. Comments fixed.