Minor: move things around
Remove debug
Use xf:valid()
Fix #1471 "Missing warning annotation with fr:number"