Improved maintainability by moving context menu code to a separate TypeScript file. Changed to camelCase naming for JSON serialization. Refactored some code in the Results view for better readability.