Refactoring draggable function to extract parseLabel method