Simplify and add ranges

Signed-off-by: Tim Smart <tim.smart@designworks.co.nz>