This includes refactoring the buttons code to remove a large amount of non-pin dependent duplication from pins.h.