Now also adds variable subscriptions to computations. Function can be reused for conditionals, though the regex will be simplified some more.