Migrating to RenderContextEx.
Fixed bugs.
Fixed affected tests.
Updated test scripts.