Updated Sockets

Added comments/javadoc
Optimalized Sockets