Some string trimming and a list of codes