Remove unused variable and collapse another