Added unit test running and minor modifications.