Added logging, and unit test capabilities