Added a resources interface for persisting data, and added a file writer.