Simplifying extention creation as per @johto suggestion. Also fixing bug exposed by failing test: There is no need to escape newline characters