Cleaned up logging, email notifications, and exception handling. Closes #31.