Saving patterns start

You can save patterns and use them in your patterns, but you can't load a saved pattern directly from the web UI yet.
More pattern cleanup