Wrap twitter parts of code into twitter.py
Update code. Add more tests