Rewrote some vector stuff