remove unused pragmas and modules