Add another sample and some tests for it
Refactor samples