Resolve circular dependency more elegantly.