Avoid circular import
Fix failing tests