refactored the thin wire code

removed faulty subwire functionality