Refactored twitter code and interfaces