Increase untitled document limit to 9999 and fix ternary operator formatting.