document MessageManager
refactor: error handling by exceptions