Working out mesh addressing
Added c tests