Cleaning up drag-and-drop implementation and adding position constraints.