Replaced vectors with pointers.  Still there are some errors but library is closing