Adding dependencies only where they are needed