Minor improvements and refactoring, refined test code, and basic benchmarking implemented.
Updated to include preliminary benchmarks.