change #define to const
change class App to singleton
create App.cpp, App.h and move class definition