Some stuff with slimerjs.
Static analysis upfront will reduce the measure of complexity.