Refactor changed. Now works with all lettuce tests.