JavaScript refactoring for desing section and option reorder methods