Dinodex oop

Refactored the code based on inputs and comments from Sophia.
Use the new Ruby 1.9 hash syntax.