refactor messages to use in options plugin