Do refactoring and upgrade version