Replace attr with attr_accessor