Added test and code to ensure classes have their base classes encoded first
Refactored grainAllMembers
Renamed grainMember
Updated TODO