Refactored the code, added saving of money values.