Repoed from Evan Burchard, edited/modified by SinhuMajeti, Jananni, and I. THIS IS THE MAIN ONE!