Update and refactoring