Implemented dragging/spinning functionality.