It does not make sense to pass a reference to Document in Ranges.select()
Tidy up range.js