Implemented saving/loading.