Massive updates to the data persistence

One piece can now be saved to a file. Currently does not upload it to
the server.