Gpio improvements