Refactor Renderer and Router