Made some modifications to socket ports and added BaseIO.