Rewrote the GUI and made the file reading code a bit more robust