remove the unused methods and few minor fixes #3007