add App class.

In Singleton class, change the return type to T*.
In Observer class, change the Attach method param type.