Macro 'belongs-to'

Refactored to store groups stuff in maps