Extract ordered_set.js from connection.js