Tidying up of the GPIO implementation.