Refactor instances of classes to separate files