added CCommandApi - base class for commands, and turned each server command into a c++ class