Exceptions moved from creof/geo
Change method visibility
Check ranges and throw library exceptions
Test for range exceptions