Moving functions around to match Jake's suggestions