Mesages: fix copying of fields; add flush function to cleanup a messages structs...