Cleaned Token code, made algorithm as param. Created XML config