Added singleton implementation and supporting unit test.