Added IOHandler to handle file I/O bullshit.
Changed StateNode from struct to class.
Changed the Main code to use file I/O.