More tidyup. Use check to clean and invoke ybd