moved rarely used ENV variables into code with defaults
more .to_i stuff