Replaced more pointer stuff with qarrays