More tidyup and checking