Memory and test improvements