Added mouse click handling for objects.
Changed speed[] to speed and direction