remove unnecessary argument of chain()
rework identifier resolution

Previously, identify() would create a new, empty variable if it failed
to identify its argument, which lead to some nasty bugs. Variable
allocation has now been moved to assign(), which means it must take an
environment as an argument.
improve error messages