Handle invalid parameter names

Will auto generate a name based on the position; no check on collision
with existing parameters.
Fix generating modifiers for interface methods.
Fix handling of whitespace between multiple optional parts of string.

This also adds the proper modifier for classes.