Just a question: Can the "success" case be called earlier, e.g. with reverted if statements? It feels like, since this is the "default case", it should be ran as quick as possible. Right now, for every new context, there are at least 4 new if-statements that all need to access JSCore selectors before completing. I hope this does not influence performance, especially for larger projects