Update messages, change some mysqli queries