Added some flake8 stuff and activation stuff and some refactoring email stuff and asynchornous email stuff