remove dead code
wrap localStorage with lend pattern
remove cookie deprecation code