isin() + some code restructuring

isin(location[] locs, location loc) checks if loc is in location[]
assuming location[] contains 2 locations ordered [min,max]

Added some commenting

Removed some capitol letters where they didn't belong/