Added code to fix term_code_errors
Script to populate table with rank = 0