Added saving and also some more functions.