Preliminary save feature

It works, but format of file is weird.