Correction to wire positioning and refactoring