Converting the serial 7 segment display code into an external and reusable class