Separate the analyzer code in main() to its own function for future patches