add comments and optimize code for the Tweets class