refactoring for working with classes as app_components