Fix initial enabled status
Added support for localStorage in browser