Remove unused code, etc