Remove unused variable and function