Changed vector implementation/tests. Added memutils.