Added handling for buttons, added avoid list for mouse clicks