read arbitrary number of procedures
pull churn calculation from trigger
make churn a separate function
order matters for loading procedures, use a list
remove unused declarations
fix indentation and return type