Adjust module dependences and related test cases