refactor binder -- move stuff into utility file, to be used by server/client