Autowiring and refactoring. Regarding #692.