Removed unused code warnings