Convert range() and irange() statics to normal functions

Should have been like this a while ago