Code cleanup.

Using parameter attributes everywhere necessary.
Discovered strings can take the place of fully qualified enumerations,
cool.
Working on env var editing.