Fixed handling of commands, And communications

Cleaned up all communications, and fixed mistakes.