Added Vec2, fixed SegFaults and other bugs