delete obsolete classes and replace deprecated methods