Added support for registers to the Materializer.
Also improved logging and error handling in a few
spots in the Materializer.