Move all dependency handling to plugin