Reorganize patterns and put them on the top