Made code more confident

"Main" method uses `Integer()` instead of `to_i`, and all expected
strings use `to_str` instead of `to_s`