Attached click events to svg instead of body, implemented edit funcitonality