added saving. Data is serialized and stored in a file with every user action.