Make the refactored library actually work.

Fixes the minor detail that the tests passed but the example didn't work :smile: