Fix bug in demo page & refactoring router