bind versions and remove unused code