Refactoring: prepare moving the shift register handler to separate library