Sample refactoring

Pull out char_list into a method