Modify router and view initialize

Modified router and and view initialize