Add namespace support to previous commit.

And print better errors.