Added deselection code and moved movement code to right-click activation.