clean up of js event binding