Refine dependencies