Fix modeling keys vals sample code

Resolves #30
Fix various incorrect code examples