Fix ordering of dependencies within the same buildfile; more cleanup