added beginning of saving infrastructure to editor