Remove unused code that has issues