Has been updated to accomodate Required and B functionality. Both were reached at the same time because I did not want to change from polling to interrupts