refactored twitter access to twitterlib.js