Creating token locally. Refatoring.