Remove deprecations/clean code