Fixed crash when running a blank command

Fixed some const correctness issues,
used std::move() on the vector in handleCommand