Dinodex oop

Refactored the code based on inputs and comments from Sophia.
You can use `unless header_value.nil?` it's easier to read.