Added an error class, and fixed division by zero in vector classes