TRUNK-1906 fixes and formatting