Reference implementation created and tested.