refactoring current app to the component based architecture