Refactored tweeting to work on iPhone