make it more oo designed

merge common operations to message server controller