fixed some warnings
implemented a bunch of utility functions for merging and working with meshes