small changes, still needs work on socket stuff