Significant tidy up of cmake build