Some more refactor around the web interface.