First commit of the Java and Ruby versions