Updates to ruby implementation