Additional fixes and tidyings