Remote listening works now.

TODO: crash upon exit. Need to fix it.