Rect Listener and clean up code

worked on allowing user to drag shapes in all directions when drawing
and cleaned up code.