Added token rules. Fixed a few errors.