Refactoring out Vars.Context, adding replacement for all logical entities, refactoring FortreTest.