small refactorings in wiring