New unit test for memory
Infra for tests expanded

Minor changes in infra