Adding options to a select. Sorting elements and saving positions in property