Reorganize dependencies