Error and token change

remove check_next_token function and stuff