Changes to wires, a few bug fixes