Rename of_key to lookup, simplify some grammar definitions.