Caching compiled Patterns for reuse, added preliminary code (currently unused) for converting to SharedPrefs, and fixed double-auto-save when manually saved.