Use map + inject for average degree
Removed erroneous variable in omnimatch

and cleaned up syntax