Add new BitSet class and use it instead of array of bools
More fixes to struct.h
Make function.cpp really compile