Unit tests and Writer Monads.

Summary:

Test Plan:

Reviewers:

CC: