Mostly ruby tweaks