Live update and more refactoring.