remove many unused code