Fix bugs with a library and a few unit tests.

Include a missing import for a library so that it does not throw a
runtime error.

Include missing imports for unit tests so that they are standalone.
Merge remote-tracking branch 'origin/master'