Tried to make code more readable with a `State` class that can hold the environment, the filename, and the infonode. 1 thing is less than 3 things.