Moved implementation code to lib.
Use specialized vector class instead of an array of floats.
Add unit tests and benchmarks for vector operations.