Switch pins around, tidy up a bit