Refactor to allow saving (untested)