Removal of EPs and of unused functions