demo page, add features and refactor