tidy up, fix compilation