misc enhancements

uses localStorage for masked text fields
initial default setting made synchronous
fixed accidental wiping in constructor