Refactoring some cucumber steps