refactoring and wiping useless methods and add simple class to improve performance