Changed commands so they callback with an error or an event