Move logic from html to router, and remove old version htmls