Minor refactor, improved example