refactored message editor