Refactors messages system and drop dialog