Refactor and clean up Cylon.IO.DigitalPin class