Fix sources and a variety of front-end bugs.