Fixed minor bugs. More verbose output for testing.