Refactor for remote nrepl