automatic fetching of new messages implemented
continued refactor