Reorganize styles hierarchically