Splitted getting token and it's processing into different methods