Implemented MeshCache for mesh resources + some minor refactoring