Midas state gesture overlap

This is a more complete version of midasState, therefore it should be pulled instead.
The logic in this functions is a little tricky to follow. I think it's good for now, and it works. I feel like there may be an easier way of doing this (mainly by not having to deal with the sequences in separating, and generalizing), but nothing comes to mind right now.