Added test-case option. Bug fixing.