Added methods for vector calculations.
Also updated documentation.