Renamed beforeTokenWrite to beforeWriteToken, fixed lint