Refactoring csr.service and csr-OOO.socket