Fixed command prompt. Now has basic function

fixed external command includes
fixed logic in command processing function