code refactoring, add twitter integration