Application refactor, examples update