Changed load function. Still using too much memory.