Socket Wrapper completed, fixing bugs in it