added testing to close(socketfd), added comments
Mode 6 implemented