Add some infrastructure, and opena socket