WIP messages: general refactoring, fixes and improvements

@jirikuncar oops , i forgot it , sorry :smile: