Implemented some data structures in Ruby