Refine dependency rules

Reworking dependency installation rules so they work.