use newer versions and tidy up