Added extra packages to latex environment.
Fixed the issue of indexes turning from integers to strings somehow.