Remove useless part and improve support for browser with no local storage