Adding code to create rank table and start of code for index tables.