Move main.cpp to app directory