Refactor message tools menu item creation

Change-Id: I9f50ba700fb6ddf0c41c8eca618918fe3618f7da