implemented persistence for user preferences

read-only for now; one step at a time
fixed gofmt compliance - reluctantly