Sample refactoring

Pull out char_list into a method
Merge branch 'Trevoke-patch-1'