Extract code that removes index column