Added some stuff to unite online and offline command processing