Remove more obsolete code.
Move generic stuff out of the example app, closes GH-21