Added 'New Pattern' and 'Duplicate Pattern' functionality.