Adding helper function

Converts an index to a mask
Adding scenario class

Work in progress..uses temp Sel class which should be replaced and
merged with the real Selection class