demo refactor & improvements