Fix some errors, change token to be case insensitive, add some test cases