Implement 2D vector class