Getting rid of superfluous getToken function