cleanup Application class