Socket sorting

Made socket sorting act properly in rare situations (ie, 3-3 will
outrank 3-2-1, etc.).  I'm not sure why I felt the need to do this.