cleanup and correction to ios rebuild