Movement now works properly when clicked
Re-creating socket functions