Add a template Singleton class and make main Application class a singleton