refactored to better separate model, data persistence still using user defaults