Refactor demo page
Add preferredWidth/Height option to demo page