Cleaning up the pin controller