Add command to event converting API
Cleanup application after 'disconnect' event