Changed constructor parameters to accept pointers.