Track api changes and remove some unused code