Seperated out the ranges
Added a stdclass to do some stuff