Added distance function, some Linear algebra functions