Improve ruby readability, minor edits