refactor signaling code, clean up callback types