Refactore dependency generator