change how the app syncs the messages so they don't have to come with the message categories. Also fix a messory leak issue.