add defelem macro; merge classes instead of replace