Update QUIT handler to use substring parser.