Add requirements.txt, improve test coverage.

Change-Id: I1c9d5ff9c7eca222913fed8d34b6ea1cdfded66a