Changed to pointers instead and use malloc.