Code refactored
Async load cache and history items added