updated module style for rima.func
updated module style for rima.sets
reduced use of scope.__index and __newindex
handled cases when resolving an index that resolve to an index