minor refactoring / clean up
added example formatter to demo