Cleaned save/load code