Re-introduced ability to send parameters via stdin via "--stdin" flag.

Cleaned up code.
Use flag package to parse --quiet and --stdin flags.