Made adding/removing listener thread safe
Changed a few command names.
Added ping command.