moved cave arrays and pointers for EM engine to level structure