web demo refactoring