bug fixes, and slight refactorings to account for connection receiving service name as needed for RPC