Moved some functions around in p-adic