Resource reduction

Made patterns generated rather than loaded from the disk