Several fixes regarding renaming

`to_i`? Please don't. Other code assigns strings to that attribute.