Security and code quality refactor. All files now have proper direct access guards. Deprecated CMSMS patterns replaced with modern equivalents. SQL identifier quoting uses the database adapter's nameQuote() method. External tracking removed. No functional changes to backup or restore behavior.