Remove shortlink link and meta tag generator
Above code is good but it didn't work because it was overwritten by Meta tag module. I adjust some settings in Configuration » Search and metadata and now generator tag and shortlink is gone.