add event listener, remove unused files