Fixes ids and removes dead or commented out code.