Added command processor, cleanup, fixes