Persisence adapted from LonelytwitterGson.