Moved Twitter code into a JS file