Removed unused code and disabled expected warning.