Make error message slightly more readable
Split token code into its own file