Adding sorted set interface and tests