going full immutable

query and form changed to deal with duplicated keys
ref #97 #112 #119