Restructure demo page and improve working