Get rid of template and replace by void pointer genericity, which is more idiomatic C. Improve ruby functionality.