Save project before closing it (if dirty).
Minor fixes.