Cleanup and GPIO implementation