Added normalize function for vectors.