Added start/stop commands ... cleaned up c++ code