removed twttr function as global variable and nested as method within tweetview. working fine.