Better way to handle dependencies