Refactor demo page