Abstract over Tokens algorithm

Change-Id: I16347d52dd7c102c7bf6a8fd2926e61e6cf75c0b