Refactoring styles to components, work on flattening