Mesh refactor

fixes #124