Added innerProduct static method and a nice set of tests for it