Refactor app view and router