Added in meshing controls (still needs tidying up)