Refactor the handling of quasi-quotes