Move listener to worker/listener, implement random ID generator + main beginnings

Signed-off-by: Robert Xu <robxu9@gmail.com>