Added functionality so that sleep history table saves to local storage