Implemented lookup and insert; added priority field to treapnode