Tried to refactor lab3 IO. It's proving very challenging. Not sure I can see a solution.