This is a collab with @fancycherry. It's it's not done.
Ummm... Some code by @fancycherry and rest by me?