added separate structure for energy grid pointers
merged changes to flatten data structures