Allow configuration via environment variable, made more config options optional and added documentation