refactored rep_server; config_server is now using rep_server