Use application factory