added an onChange function, though it may not be needed later
updated getters/setters to work with gpio buttons more efficiently