Renamed to StartListening and StopListening to avoid name collisions
Explicitly define the empty body of while statements
Removed unused variables
Can't add integers to strings directly
Added missing cmath includes
Added missing virtual destructors
Added wrapping braces to avoid potential issues with scope
Normalized the interface for GetCommandName to be const method
Fixed ambiguous logic