Moving application.cpp to examples