Refactored data structure. Fixed connection between draggable and sortable.