Adding support for IP-based tokens. Removing unneeded code.