primary application infrastructure refactor