Restructure to create daemon application.