Added form validation; improved generateTweet algorithm