Update classes to new style and fix imports in a script