Remove unused code to get rid of warnings