Added Testable interface and moved some testing code there.