Add example application
Cleanups and fixes