Code adapted to work with ProgArm 0.2, added Pin class to shorten pin initialization, refactoring