Added untested conversion of variable logic.