Added Token class and error messages