Add command structure to profile.cpp

Borrowed the basic structure of main.cpp to use on profile.cpp. Any
client interaction with this file is probably broken (or non-existent).