Changed token functions names to follow PHPF coding standards

Changed token functions names to follow PHPF coding standards + few
other small improvements