Refactored dinodex based on Franco's comments

Also file_array. These can be more descriptive