Removing unneeded reference modules