Fixing errors.

Merging  branches introduced a number of errors. This commit should fix
everything.