Now passing refactored test cases