Some of this stuff should get split out into 7-segment logic probably, having logic in the top file seems like a bad call
Hopefully this is enough of the project files for this to work ...