Naive re-implementation of Ruby hash, purely for fun