Adding a close for the IO and added ability to change port.