Actually fixed energyLocation issue now, looks in cwd first and mallocs correctly so the memory doesn't get reused.