Use #define for repetitive strings
Refactoring
Stream selection and environment variables are described