Changed logical structure of the class

has been changed to avoid problems with low memory devices. has stopped
using an array in memory for storing tokens.