Refactor dependencies resolution in a single location