Added dat cache

added the functions to save to file, also added favorites.