fix labels, remove unused code