Refactor the depend structure of console plugins.