Updated to generate GROUP BY clauses more reliably.
Fix in regex used for function detection, categorization, and identification.
Function handlers refactored to separate aggregate functions from all functions with known return types.