Dinodex oop

Refactored the code based on inputs and comments from Sophia.
You can make this conditional unless `header_value.nil?` and then have the conditionals that follow not need to check i f the header is nil.