Cleaned up file loading, implemented file saving