Finished CSV writer, added first energy tests