Rewrite some class.
Replace dependencies.