simplified interface in demo page, lots of improvements on validation, and decoupling