Moved update logic to jQuery and added sortable elements. Elements can be re-ordered by dragging them in the window