Remove unused code from end of file