Fix for InvalidOperationException.
Preload entities for speed.
Skip routines having invalid ParameterMode.
Undup routine parameter names.