localStorage put into storage variable

Trimmed down to 4425 bytes