Application refactor