Remove unused function & some crufty switches