Get rid of free function tricks.
Add header.
Cleanup
Port another tutorial sample.