Added event handling for clicking items to complete