removed Mesh class and global vars