whitespace triming
add localstorage support