Refactor and add scape chars