Derped the code from the last commit slightly. The code that were missing for the file saving wasn't made compatible with file saving