Adding support for import/export of patterns