added Array struct to make code a little clearer in the function calls, begining to work on replacing the internal *new with pass by reference calls