adds range_max param

- reprojects x, y, z = range_max when no reading
- uses i=j=0 instead of i=j=1 (last 2 rows were discarded)
fixes minor warnings and cosmetics
Merge pull request #11 from efernandez/range_max_param

Add range_max parameter