Refactor examples in order for the example apps to be self-contained.