Refactored away SharedPreferences and used cache.