Memory and unittest fixes