Refine GPIO, add comments