simplify and fix preview, find port etc.
use phuture
simplify using phuture