Angle calculation and generation work as expected now. Also, I built in the choice to use the lattice periodicity module