Adding dependency injection. Improving application structure.